home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 4
/
Mac Giga-ROM 4.0 - 1993.toast
/
FILES
/
HYP
/
C-D
/
DiskManager2.cpt
/
DiskManager 2.0
/
background_2906.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
3KB
|
110 lines
-- background: 2906 from stack: in.0
-- bmap block id: 4829
-- flags: 4000
-- background id: 0
-- name:
----- HyperTalk script -----
on newStack
extend
end newStack
on extend
-- type "extend" into the message box and press return to make
-- three months worth of new cards.
if the name of this stack contains "stack ideas"
then
answer "Please make a new stack before extending it." with "OK"
else
answer "Make three months more of new cards?" with "OK" or "Cancel"
if it is "Cancel" then exit extend
go to last card of this background
put getStartDate() into start --what date to begin on
if start is "Cancel" then exit extend
put 60*60*24 into OneDay --seconds in a day
repeat with cnt = 1 to (365 div 4) --three months
put start into it --a copy
convert it to long date
put it into field "Date"
add OneDay to start
doMenu New Card
end repeat
convert start to long date --fix the last card
put start into field "Date"
end if
end extend
function getStartDate
-- end of stack or today, whichever is newer
get field "Date"
if it is empty then put the short date into it
convert it to seconds --so we can compare
put the short date into today
convert today to seconds
if today < 2587766400 then
answer "Set the Control Panel to today's date" with "OK"
return "Cancel"
end if
if it >= today then return it --calendar already beyond today
convert it to short date
answer "Start from which date?" with it or the short date or "Cancel"
if it is "Cancel" then return it
convert it to seconds
return it
end getStartDate
on openBackground
push recent card
end openBackground
-- part 93 (field)
-- low flags: 01
-- high flags: 0007
-- rect: left=50 top=33 right=342 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 94 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=6 top=131 right=161 bottom=47
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Back
----- HyperTalk script -----
on mouseUp
go to card id 12441
end mouseUp
-- part 95 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=6 top=174 right=203 bottom=48
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: MORE
----- HyperTalk script -----
on mouseUp
go to card id 11209
end mouseUp